//
//  Header.h
//  ZZTong
//
//  Created by handpay on 13-5-3.
//  Copyright (c) 2013年 handpay. All rights reserved.
//
#import "DefineUtil.h"
#import "ZZTongColorDefine.h"

#define ZZTDebug   1

#if defined (ZZTDebug) && (ZZTDebug == 1)
    #define APPSERVERURL     @"http://10.48.196.232:9580/hpaySft/"    //15环境 
//    #define APPSERVERURL     @"http://10.48.196.232:8380/hpaySft/"    //30环境
//    #define APPSERVERURL     @"http://10.48.193.230:8380/hpaySft/"    //开发环境
//    #define APPSERVERURL     @"http://180.168.168.85:11880/hpaySft/"  //开发环境
//    #define APPSERVERURL     @"http://10.48.193.109:8080/hpaySft/"    //成珍
//    #define APPSERVERURL     @"http://10.48.192.19:80/hpaySft/"       //预发布环境\
//银联
//    #define CUPSERVERURL     @"http://218.80.192.213:1725/Gateway/MobilePayment"   // 银联开发环境
    #define CUPSERVERURL     @"http://202.101.25.178:8080/Gateway/MobilePayment"   // 银联仿真环境
#else
    #define APPSERVERURL     @"http://mps.handpay.cn/hpaySft/"  //生产环境
//银联
    #define CUPSERVERURL     @"http://202.96.255.146:8080/Gateway/MobilePayment"   // 银联生产环境
#endif

//#define ZZTSetUrl   1
//HPSetUrlViewController

/**
 网络请求Action常量
 **/
#define NET_ACTION_VERIFY_VERSION                   @"zztVerifyVersion"
#define NET_ACTION_BALANCE                          @"zztBalanceEnquiry20"
#define NET_ACTION_SUBATM_QUERY_FEE                 @"subatmQueryFee"
#define NET_ACTION_SUBATM_TRANSFER                  @"subatmTransfer"
#define NET_ACTION_ACCOUNT_TRANSFER                 @"zztAccountTransfer20"
#define NET_ACTION_ZZT_LOGIN                        @"zztAccountLogin"
#define NET_ACTION_ZZT_GET_SWIPER_STATUS            @"zztGetSwiperStatus"
#define NET_ACTION_ZZT_BIND_SWIPER                  @"zztBindSwiper"
#define NET_ACTION_REGISTER                         @"zztAccountRegister"
#define NET_ACTION_SEND_PHONE_CODE                  @"zztSendPhoneCode"
#define NET_ACTION_MODIFY_ACCOUNT_PWD               @"zztModifyAccountPwd"
#define NET_ACTION_MODIFY_MOBILE                    @"zztModifyPhoneNum"
#define NET_ACTION_CHECK_MOBILE                     @"zztCheckPhoneNum"
#define NET_ACTION_GET_BANK_LIST                    @"zztBankList"//@"zztGetBanks"
#define NET_ACTION_GET_BRANCHS                      @"zztSubBankList"
#define NET_ACTION_MODIFY_CARDNO                    @"zztModifyCardNum"
#define NET_ACTION_GET_LIMIT                        @"zztGetLimit"
#define NET_ACTION_WITHDRAW                         @"zztWithdraw"
#define NET_ACTION_QUERY_RWD_RECORDS                @"zztQueryRWDRecords"
#define NET_ACTION_LOGOUT                           @"zztAccountExit"
#define NET_ACTION_UPLOAD_PHOTO                     @"zztUploadPicInfo"
#define NET_ACTION_UPLOAD_UCINFO                    @"zztUCInfo"
#define NET_ACTION_BANK_PROVINCE                    @"zztBankProvinceList"
#define NET_ACTION_BANK_AREA                        @"zztBankAreaList"
#define NET_ACTION_MERCHANT_INFO                    @"zztGetMerchantInfo"
#define NET_ACTION_GET_AUDIT_INFO                   @"zztGetAuditInfo"
#define NET_ACTION_QUERY_BILLS                      @"zztQueryAccountBills"
#define NET_ACTION_UPLOAD_SIGN                      @"uploadSign"
#define NET_ACTION_QUERY_FOUR_ELEMENTS              @"queryHXFourElements"
#define NET_ACTION_ADD_FOUR_ELEMENTS                @"addHXFourElements"


#define KEY_TOTAL                             @"total"
#define KEY_FEE                               @"fee"
#define KEY_AMOUNT                            @"amount"
#define KEY_CHANNEL                           @"channel"
#define KEY_CSN                               @"csn"
#define KEY_ACCOUNT                           @"account"
#define KEY_PHONE                             @"phone"
#define KEY_LOCATION                          @"location"
#define KEY_ACTION                            @"action"
#define KEY_VERIFYCODE                        @"verifyCode"
#define KEY_ADDRESS                           @"address"
#define KEY_NEWBANK_FLAG                      @"newBankFlag"

#define KCityKey        @"City"
#define KStateKey       @"State"
#define KSubLocalityKey @"SubLocality"
#define KAddressKey     @"Address"
#define KLatitudeKey    @"latitude"
#define KLongitudeKey   @"longitude"

#define KEY_USER_NAME                         @"zzt_userName"
#define KEY_IMG_NAME                          @"imgName"
#define KEY_BANK_NAME                         @"bankName"
#define KEY_TRADE                             @"dgTrade"

#define BindCSN         @"bindCSN"
#define QualityCSN      @"QualityCSN"
////talbe 
#define KLABELWIDTH    85
#define KLINEHEIGHT    30
#define KLINESPACE     5
#define KSIGNHEIGHT    100
//
#define kDes            @"key"
#define kPlaceHolder    @"hint"
#define kFuncName       @"func"

#define kValue  @"value"

/**
 网络地址key常量
 **/
#define APP_URL_NAME            @"appserver"
#define CUP_URL_NAME            @"cupserver"

// 刷卡器状态变化通知key
#define SwiperStateChangeNotificationKey      @"SwiperStateChangeNotificationKey"

//返回到登录页面通知
#define WillPopToLoginNotificationKey         @"WillPopToLoginNotificationKey"

#define HPStartDrawNotificationKey      @"HPStartDrawNotificationKey"

// 审核状态变化通知key
#define AccountStatusChangeNotificationKey      @"AccountStatusChangeNotificationKey"

#define TableBarSelectedIndexChangeNotificationKey      @"TableBarSelectedIndexChangeNotificationKey"

//#define SwiperSelectSuccessNotificationkey          @"SwiperSelectSuccessNotificationkey"

#define NOTIFICATION                [NSNotificationCenter defaultCenter]
// 判断设备是否为iphone5
#define HP_Device_iPhone5           ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define IPHONE5_ADD_HEIGHT               88


// 密码占位符图片tag开始
#define kPWDPlaceHolderImgTagStart  10000


// 黄色按钮文字颜色
#define kGoldenButtonTitleColor             UIColorFromRGB(0x795102)

// 背景颜色
#define kNormalBackgroundColor              RGBCOLOR(243, 243, 243)


// 默认按钮字体
#define kNormalButtonFont                   [UIFont boldSystemFontOfSize:18.]

#define kCellHeight 50

//lzwu  六期新加的

// 默认字体
#define kNormalFont                         [UIFont systemFontOfSize:16.]

//最大金额
#define kMaxAmountFont                      [UIFont systemFontOfSize:40.]

//今日两字
#define kBigFont                            [UIFont systemFontOfSize:28.]

#define kSecondBigFont                      [UIFont systemFontOfSize:22.]

#define kSecondSmallFont                    [UIFont systemFontOfSize:14.]
#define kSmallFont                          [UIFont systemFontOfSize:12.]


//金额字体在深色背景
#define kLightGreenFontColor                     UIColorFromRGB(0x5BFF26)

//金额字体在浅色背景
#define kDarkGreenFontColor                      UIColorFromRGB(0x24CC3A)

//失败字体颜色
#define kRedFontColor                            UIColorFromRGB(0xFF5200)

//主要字体颜色
#define kNormalFontColor                         UIColorFromRGB(0x777777)

//横线颜色
#define kLineFontColor                           UIColorFromRGB(0xCCCCCC)

//默认背景文字颜色
#define kGrayFontColor                           UIColorFromRGB(0xDDDDDD)

//审核中文字颜色
#define kLicFontColor                           UIColorFromRGB(0xF8C500)

#define kTitleTipsColor                          UIColorFromRGB(0x2fa9c0)

#define kBelowData      @"belowData"
#define kAboveData      @"aboveData"
#define kTransType      @"transType"
#define kBusinissType   @"businissType"
#define kSignImage      @"signImage"

#define transResult            @"transResult"
#define transRecord            @"transRecord"
#define transTypeTransfer      @"transfer"
#define transTypeFastTransfer  @"fastTransfer"

#define SWIPER_INPUT_PWD                      @"inputPwd"
#define SWIPER_INPUT_IC_PWD                   @"inputICPwd"
#define SWIPER_CONFIRM_AMOUNT                 @"confirmAmount"
#define SWIPER_SWIPE                          @"swipe"
#define SWIPER_ENCYPT_DATA                    @"encyptData"
#define SWIPER_SELECT_DIR                     @"selectDir"
#define SWIPER_REGISTER_PWD                   @"RegisterPwd"
#define SWIPER_MAC                            @"mac"

//
#define PREV_QUERY_BANKCARD     @"VI01"
#define PREV_DELETE_BANKCARD    @"VI02"

#define SPID                    "0001"
#define CHIPTP                  "51"

#define TipsICCantSwipe         @"该卡为IC磁条卡，请插入IC卡插槽进行交易"
#define TipsConfirmAmountErr    @"金额确认超时或刷卡器错误"
#define TipsInputPwdErr         @"输入密码超时或刷卡器错误"
#define TipsSwiperErr           @"刷卡超时或刷卡器错误"
#define TipsCancel              @"用户已取消"
#define TipsEncryptErr          @"刷卡器加密错误"
#define TipsLowBattery          @"刷卡器电量不足，请在充电后进行交易"


#ifndef LOG//(...)
    #ifdef DEBUG
        #define LOG(...) NSLog(__VA_ARGS__);
    #else
        #define LOG(...)
    #endif
#endif

#ifndef HP_RELEASE
    #define HP_RELEASE(x) [x release]; x= nil;
#endif



